import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
    children: [{
        path: '/home',
        redirect: '/home/about'
      },
      {
        path: '/home/about',
        component: () => import('@/views/About')
      }
    ]
  }

]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router